ASP. NET 2.0 improves the Data Binding operation in the template. It simplifies the Data Binding syntax databinder. eval (container. dataitem, fieldname) in v1.x to eval (fieldname ). The eval method, like databinder. Eval, can accept an optional
Differences and usage of data formatting-eval ("") and databinder. eval (container. dataitem, "")
ASP. NET 2.0 improves the Data Binding operation in the template. It simplifies the Data Binding syntax databinder. eval (container. dataitem,
Eval () methodDuring runtime, reflection is used to perform post-binding computation. Therefore, compared with the standard ASP. NET data binding method bind, performance will be significantly reduced. It is generally used to format strings when
@ Lao Zhao's one Weibo "is the code generated by eval really inefficient?" Http://t.cn/zWTUBEo contains personal attacks, not happy to enter. ”
Triggered a recent discussion of the eval, the Archbishop @Franky and Gray @otakustay also gave a
Statement:
First of all, I am a newbie to JS, So I dare not go into depth. I just share my recent eval learning experience with you. If you are a master, I can skip it.
Suitable for readers:
I have no idea how eval converts a string to a JSON
In-depth analysis of the functions of JSON. parse (), JSON. stringify () and eval (), json. stringifyeval
"JSON (JavaScript Object Notation) is a lightweight data exchange format. It is based on a subset of ECMAScript. Because it adopts a
1. Bind isBidirectional data binding, Will change only when there is a data source.
2. In net1.x, there are databinder (container. dataitem, "data item ")One-way Data Binding
. Net2.x is simplified to eval ("data item ");
The difference
Eval () methodLate-bound calculations are performed using reflection at run time, so performance is significantly reduced compared to the standard ASP. NET data binding method. It is typically used when binding requires formatting a string. Use this
JavaScript eval () function definition and usageThe eval () function computes a string and executes the JavaScript code in it.GrammarEval (String)
Parameters
Description
String
Necessary. The string to
Definition and usage the eval () function computes a string and executes the JavaScript code in it.
The syntax eval (string) argument describes string as required. The string to evaluate, which contains the JAVASCRIPT expression to evaluate or the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.